﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Harkon.AppServer.cOne.Service;

namespace ClusterComponentA
{

    public class ADedicatedBusinessObject
    {
        public DateTime CreationTime { get; set; }
        public string InitialString { get; set; }
        public string Result { get; set; }

        public override string ToString()
        {
            return Result;
        }
    }

    public interface IWillBeUsed : IService
    {
        ADedicatedBusinessObject AppendStringToObject(ADedicatedBusinessObject businessObject, string toBeAppended);
    }

    public class WillBeUsed : AbstractService, IWillBeUsed
    {
        public ADedicatedBusinessObject AppendStringToObject(ADedicatedBusinessObject businessObject, string toBeAppended)
        {
            businessObject.Result = businessObject.InitialString + toBeAppended;
            return businessObject;
        }
    }
}
